import request from './request'
import {Md5} from 'ts-md5'

export const login = (username: string, password: string) => {
    const password_md5 = Md5.hashStr(password)
    return request({
        url: '/api/login',
        method: 'POST',
        data: {
            username: username,
            password: password_md5
        }
    })
}